Optimal. Leaf size=385 \[ \frac {a b x}{c e}+\frac {b^2 x \tanh ^{-1}(c x)}{c e}-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2 e}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}+\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c e^2}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^2 e}+\frac {b^2 d \text {PolyLog}\left (2,1-\frac {2}{1-c x}\right )}{c e^2}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {PolyLog}\left (3,1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {PolyLog}\left (3,1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 385, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 11, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {6087, 6021,
6131, 6055, 2449, 2352, 6037, 6127, 266, 6095, 6059} \begin {gather*} -\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2 e}+\frac {b d^2 \text {Li}_2\left (1-\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{e^3}-\frac {d^2 \log \left (\frac {2}{c x+1}\right ) \left (a+b \tanh ^{-1}(c x)\right )^2}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c x+1) (c d+e)}\right )}{e^3}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}+\frac {2 b d \log \left (\frac {2}{1-c x}\right ) \left (a+b \tanh ^{-1}(c x)\right )}{c e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}+\frac {a b x}{c e}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^2 e}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{c x+1}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (c x+1)}\right )}{2 e^3}+\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c e^2}+\frac {b^2 x \tanh ^{-1}(c x)}{c e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 2352
Rule 2449
Rule 6021
Rule 6037
Rule 6055
Rule 6059
Rule 6087
Rule 6095
Rule 6127
Rule 6131
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{d+e x} \, dx &=\int \left (-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x \left (a+b \tanh ^{-1}(c x)\right )^2}{e}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2 (d+e x)}\right ) \, dx\\ &=-\frac {d \int \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx}{e^2}+\frac {d^2 \int \frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{d+e x} \, dx}{e^2}+\frac {\int x \left (a+b \tanh ^{-1}(c x)\right )^2 \, dx}{e}\\ &=-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}+\frac {(2 b c d) \int \frac {x \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{e^2}-\frac {(b c) \int \frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )}{1-c^2 x^2} \, dx}{e}\\ &=-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}+\frac {(2 b d) \int \frac {a+b \tanh ^{-1}(c x)}{1-c x} \, dx}{e^2}+\frac {b \int \left (a+b \tanh ^{-1}(c x)\right ) \, dx}{c e}-\frac {b \int \frac {a+b \tanh ^{-1}(c x)}{1-c^2 x^2} \, dx}{c e}\\ &=\frac {a b x}{c e}-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2 e}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}+\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c e^2}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}-\frac {\left (2 b^2 d\right ) \int \frac {\log \left (\frac {2}{1-c x}\right )}{1-c^2 x^2} \, dx}{e^2}+\frac {b^2 \int \tanh ^{-1}(c x) \, dx}{c e}\\ &=\frac {a b x}{c e}+\frac {b^2 x \tanh ^{-1}(c x)}{c e}-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2 e}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}+\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c e^2}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}+\frac {\left (2 b^2 d\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1-c x}\right )}{c e^2}-\frac {b^2 \int \frac {x}{1-c^2 x^2} \, dx}{e}\\ &=\frac {a b x}{c e}+\frac {b^2 x \tanh ^{-1}(c x)}{c e}-\frac {d \left (a+b \tanh ^{-1}(c x)\right )^2}{c e^2}-\frac {\left (a+b \tanh ^{-1}(c x)\right )^2}{2 c^2 e}-\frac {d x \left (a+b \tanh ^{-1}(c x)\right )^2}{e^2}+\frac {x^2 \left (a+b \tanh ^{-1}(c x)\right )^2}{2 e}+\frac {2 b d \left (a+b \tanh ^{-1}(c x)\right ) \log \left (\frac {2}{1-c x}\right )}{c e^2}-\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+c x}\right )}{e^3}+\frac {d^2 \left (a+b \tanh ^{-1}(c x)\right )^2 \log \left (\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 \log \left (1-c^2 x^2\right )}{2 c^2 e}+\frac {b^2 d \text {Li}_2\left (1-\frac {2}{1-c x}\right )}{c e^2}+\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+c x}\right )}{e^3}-\frac {b d^2 \left (a+b \tanh ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{e^3}+\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2}{1+c x}\right )}{2 e^3}-\frac {b^2 d^2 \text {Li}_3\left (1-\frac {2 c (d+e x)}{(c d+e) (1+c x)}\right )}{2 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 12.29, size = 1250, normalized size = 3.25 \begin {gather*} \frac {-6 a^2 d e x+3 a^2 e^2 x^2+6 a^2 d^2 \log (d+e x)+\frac {6 a b \left (c e^2 x+i c^2 d^2 \pi \tanh ^{-1}(c x)-2 c^2 d e x \tanh ^{-1}(c x)+e^2 \left (-1+c^2 x^2\right ) \tanh ^{-1}(c x)+2 c^2 d^2 \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x)-c^2 d^2 \tanh ^{-1}(c x)^2+c d e \tanh ^{-1}(c x)^2-c d \sqrt {1-\frac {c^2 d^2}{e^2}} e e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^2-2 c^2 d^2 \tanh ^{-1}(c x) \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )-i c^2 d^2 \pi \log \left (1+e^{2 \tanh ^{-1}(c x)}\right )+2 c^2 d^2 \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+2 c^2 d^2 \tanh ^{-1}(c x) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )-c d e \log \left (1-c^2 x^2\right )-\frac {1}{2} i c^2 d^2 \pi \log \left (1-c^2 x^2\right )-2 c^2 d^2 \tanh ^{-1}\left (\frac {c d}{e}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )+c^2 d^2 \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )-c^2 d^2 \text {PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )}{c^2}+\frac {b^2 \left (6 c e^2 x \tanh ^{-1}(c x)+6 c d e \tanh ^{-1}(c x)^2-6 c^2 d e x \tanh ^{-1}(c x)^2+3 e^2 \left (-1+c^2 x^2\right ) \tanh ^{-1}(c x)^2-2 c^2 d^2 \tanh ^{-1}(c x)^3+2 c d e \tanh ^{-1}(c x)^3+12 c d e \tanh ^{-1}(c x) \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )-6 c^2 d^2 \tanh ^{-1}(c x)^2 \log \left (1+e^{-2 \tanh ^{-1}(c x)}\right )+3 e^2 \log \left (1-c^2 x^2\right )+6 c d \left (-e+c d \tanh ^{-1}(c x)\right ) \text {PolyLog}\left (2,-e^{-2 \tanh ^{-1}(c x)}\right )+3 c^2 d^2 \text {PolyLog}\left (3,-e^{-2 \tanh ^{-1}(c x)}\right )-\frac {6 c d (-c d+e) (c d+e) \left (-6 c d \tanh ^{-1}(c x)^3+2 e \tanh ^{-1}(c x)^3-4 \sqrt {1-\frac {c^2 d^2}{e^2}} e e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )} \tanh ^{-1}(c x)^3-6 i c d \pi \tanh ^{-1}(c x) \log \left (\frac {1}{2} \left (e^{-\tanh ^{-1}(c x)}+e^{\tanh ^{-1}(c x)}\right )\right )-6 c d \tanh ^{-1}(c x)^2 \log \left (1+\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1+e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (1-e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+12 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x) \log \left (\frac {1}{2} i e^{-\tanh ^{-1}\left (\frac {c d}{e}\right )-\tanh ^{-1}(c x)} \left (-1+e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )+6 c d \tanh ^{-1}(c x)^2 \log \left (\frac {1}{2} e^{-\tanh ^{-1}(c x)} \left (e \left (-1+e^{2 \tanh ^{-1}(c x)}\right )+c d \left (1+e^{2 \tanh ^{-1}(c x)}\right )\right )\right )-6 c d \tanh ^{-1}(c x)^2 \log \left (\frac {c (d+e x)}{\sqrt {1-c^2 x^2}}\right )-3 i c d \pi \tanh ^{-1}(c x) \log \left (1-c^2 x^2\right )-12 c d \tanh ^{-1}\left (\frac {c d}{e}\right ) \tanh ^{-1}(c x) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )\right )-6 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,-\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )+12 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+12 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )+6 c d \tanh ^{-1}(c x) \text {PolyLog}\left (2,e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )+3 c d \text {PolyLog}\left (3,-\frac {(c d+e) e^{2 \tanh ^{-1}(c x)}}{c d-e}\right )-12 c d \text {PolyLog}\left (3,-e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )-12 c d \text {PolyLog}\left (3,e^{\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)}\right )-3 c d \text {PolyLog}\left (3,e^{2 \left (\tanh ^{-1}\left (\frac {c d}{e}\right )+\tanh ^{-1}(c x)\right )}\right )\right )}{6 c^2 d^2-6 e^2}\right )}{c^2}}{6 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 25.63, size = 1729, normalized size = 4.49
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1729\) |
default | \(\text {Expression too large to display}\) | \(1729\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} \left (a + b \operatorname {atanh}{\left (c x \right )}\right )^{2}}{d + e x}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2\,{\left (a+b\,\mathrm {atanh}\left (c\,x\right )\right )}^2}{d+e\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________